// 引用模板
import index from '../page/index.vue'
import content from '../page/content.vue'

// 引入子路由
import Frame from '../frame/subroute.vue'
import userIndex from  '../page/user/index.vue'
import UserSetting from '../page/user/UserSetting.vue'
import email from '../page/user/email.vue'
import emailSub from '../page/user/emailSub.vue'
import preview from '../page/user/preview.vue'
import edit from '../page/user/edit.vue'

// 引入子页面
import userInfo from '../page/user/info.vue'
import userLove from '../page/user/love.vue'
// 配置路由
const routes = [
  {
    path: '/',
    component: index
  },
  {
    path: '/content',
    component: content
  },
  {
    path: '/nested',
    component: UserSetting,
    children: [{
      path: 'emails',
      component: emailSub
    },{
      path: 'profile',
      components: {
        default: edit,
        preview: preview
      }
    }]
  },
  {
    path: '/user',
    name: 'user',
    component: Frame,
    children: [
      {path: '/', component: userIndex},
      {path: 'info', component: userInfo},
      {path: 'love', component: userLove},
    ]
  }
]
export default routes